1. Field of the Invention
The present invention is related generally to a data processing system and in particular to an improved load balancer. More particularly, the present invention is directed to a computer implemented method, apparatus, and computer usable program code for a load balancing feedback controller enhanced by feed-forward control for reacting to server state changes.
2. Description of the Related Art
A computer data center is a physical structure designed to house multiple computing devices, such as application servers. An application server is a computing device connected to a network that is wholly or partially dedicated to running one or more applications. An application is computer software that uses the resources of a computing device to perform a task or service for a user.
A computer data center may include multiple application servers loosely coupled together in a cluster. This cluster of connected servers may be a computer cluster or a server farm. Each application server in a cluster may deploy several applications providing one or more different services to users. An application providing a given service may be replicated on multiple application servers in the cluster. The replication of the application allows multiple requests to access a given application to be handled concurrently by two or more servers. In addition, replication of the application on multiple application servers also allows an application to remain available even if one server providing the application is down or unavailable. However, the various requests to access applications on the cluster need to be managed to enable optimal performance of the applications on the cluster.
Load balancing is a front-end process for managing and assigning work loads to two or more application servers in a cluster to optimize performance of the application and decrease execution time. Load balancing is typically performed by a load balancer. Typically, all requests to access an application on a cluster are routed to a back-end server by the load balancer. The load balancer receives a request for an application, selects a given server to run the application, and distributes the request to the selected back-end application server. The load balancer routes requests for a given application to a given server running that application to achieve similar performance to each request, independent of the particular server that is destined to execute the request. To achieve this result, the load balancer must take into account factors that affect application performance on each server.
The performance provided by a server depends on many factors, including the load on the server, the number of applications deployed on the server, and dynamic changes to the state of the server. The load refers to the amount of work currently being performed by the server. A state change refers to a change in the current operating state of the computing device. A server state change may be either a managed change or an unmanaged change. A managed change is a change that occurs at the direction or control of a user and/or a load balancer. Examples of managed state changes include starting execution of an application or stopping execution of an application. An unmanaged state change is a change that occurs without the control or direction of a user or load balancer. For example, an unmanaged state change may include, but is not limited to, periodic garbage collection, daemons, and/or other background workloads.
The impact of a server state change on the server performance can be quite significant. A server state change should result in the load balancer decreasing the amount of traffic destined to that server. However, currently available load balancers only detect server state changes through the measurement of current server performance. A change in state of a given server is not registered until after the change in state has affected the performance of the given server to a degree that the change in performance is measurable by a performance monitor.
Thus, the detection and reaction to server state changes may be slow and result in degraded application server performance for potentially lengthy periods of time. For example, when a new application begins executing on a given server, the load balancer may not become aware of the state change until the server processing time has already slowed due to the state change. A similar problem may occur when the server returns to its normal state, for example, when execution of the new application ends.